const app = getApp()
Page({

  data: {
    imgUrl: app.globalData.imgUrl,
    userInfo: wx.getStorageSync('userInfo') || {},
    mobile:''
  },
  onShow:function(){
    var userInfo = wx.getStorageSync('userInfo').mobile
    this.setData({
      mobile: userInfo.substring(0, 3) + '******' + userInfo.substring(8, 11) 
    })
  },
  toAddressList:function(){
    wx.navigateTo({
      url: '/pages/address/list', 
    })
  },
  //编辑
  handleEdit:function(){
    wx.navigateTo({
      url: '/pages/menber/my/index',
    })
  },

  outlogin:function(){
    wx.removeStorageSync('Authorization', '');
    wx.removeStorageSync('userInfo');
    wx.removeStorageSync('authorized');
    wx.showToast({
      title: '退出成功',
    })
    setTimeout(function(){
      wx.redirectTo({
        url: '/pages/login/login',
      })  
    },1500)
  }



})